FROM python:2.7
ADD . /code
WORKDIR .
ADD . .
RUN pip install --no-cache-dir -r requirements.txt  -i https://pypi.tuna.tsinghua.edu.cn/simple/
RUN pip install --no-cache-dir gevent hiredis cython -i https://pypi.tuna.tsinghua.edu.cn/simple/
RUN find . -name "*.pyc" -delete
CMD ["gunicorn","-k gevent","-w 8","-b :33333","startmaster:application","--graceful-timeout 8","--worker-connections 100"]
